package com.seagull.sb.clouddrive;


import com.google.api.client.googleapis.media.MediaHttpDownloader;
import com.google.api.client.googleapis.media.MediaHttpDownloaderProgressListener;

/**
 * The File Download Progress Listener.
 *
 * @author ramesh.kale@gmail.com (Ramesh Kale)
 */
public class DownloadListener implements MediaHttpDownloaderProgressListener {

  public void progressChanged(MediaHttpDownloader downloader) {
    switch (downloader.getDownloadState()) {
      case MEDIA_IN_PROGRESS:
        ProgressView.header2("Download is in progress: " + downloader.getProgress());
        break;
      case MEDIA_COMPLETE:
        ProgressView.header2("Download is Complete!");
        break;
    }
  }
}